You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This change is follow up for #2836 and applies more fixing in the Cast_Ray function.
Before this change the ray cast was failing if the camera was positioned below the max terrain height. The logical consequence was that no unit could be ordered to move anywhere on close zoom.
With the fixed logic the initial terrain hit box is assembled in a way that the ray cast has a chance to hit it before moving forward with the narrowing search.
xezon
added
Bug
Something is not working right, typically is user facing
Major
Severity: Minor < Major < Critical < Blocker
Gen
Relates to Generals
ZH
Relates to Zero Hour
ThisProject
The issue was introduced by this project, or this task is specific to this project
Input
labels
Jul 12, 2026
In my effort to understand how BaseHeightMapRenderObjClass::Cast_Ray works, I found myself doing a cleanup / refactor because the initial function setup is a mess. I don't have permission to push the results of that effort to your branch, so here's my own: https://github.com/Caball009/GeneralsGameCode/tree/xezon/fix-cast-ray Perhaps you'll find it useful to include in this PR.
More refactor is beyond the goal of this change so I will leave it as is in this pull.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BugSomething is not working right, typically is user facingGenRelates to GeneralsInputMajorSeverity: Minor < Major < Critical < BlockerThisProjectThe issue was introduced by this project, or this task is specific to this projectZHRelates to Zero Hour
2 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change is follow up for #2836 and applies more fixing in the Cast_Ray function.
Before this change the ray cast was failing if the camera was positioned below the max terrain height. The logical consequence was that no unit could be ordered to move anywhere on close zoom.
With the fixed logic the initial terrain hit box is assembled in a way that the ray cast has a chance to hit it before moving forward with the narrowing search.